package main

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/gogf/gf/v2/net/ghttp"
)

func main() {
	s := g.Server()
	s.BindHandler("/cookie", func(r *ghttp.Request) {
		myDate := r.Cookie.Get("myDate")
		r.Cookie.SetCookie("myDate", "test:2019-01-01", "", "/", 0)
		r.Response.Writef("myDate:%v", myDate)
	})
	s.SetPort(8100)
	s.Run()
}
